Skip to content

Comments

Update primary name flows to account for default reverse registry#1102

Open
storywithoutend wants to merge 6 commits intomainfrom
feature/fet-2789-managerv3-update-primary-name-flows-to-account-for-default
Open

Update primary name flows to account for default reverse registry#1102
storywithoutend wants to merge 6 commits intomainfrom
feature/fet-2789-managerv3-update-primary-name-flows-to-account-for-default

Conversation

@storywithoutend
Copy link
Collaborator

No description provided.

Add support for the default reverse registry in primary name flows:
- Add useDefaultReverseRegistryName hook to query default registry
- Add usePrimaryNameFromSources hook to combine L1 and default sources
- Add setDefaultPrimaryName and resetDefaultPrimaryName transactions
- Update ResetPrimaryName flow to handle both registries
- Update SelectPrimaryName to use new primary name source hook
- Add translations for new transaction types
Fix variable shadowing in usePrimaryNameFromSources by using query
object access instead of destructuring. Update test mocks to use
usePrimaryNameFromSources instead of useReverseRegistryName. Add
e2e test fixtures for primary name state management.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 19, 2026

Deploying ens-app-v3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 273bef4
Status: ✅  Deploy successful!
Preview URL: https://2244893b.ens-app-v3.pages.dev
Branch Preview URL: https://feature-fet-2789-managerv3-u.ens-app-v3.pages.dev

View logs

storywithoutend and others added 3 commits January 19, 2026 14:53
…ryName fixture

Remove dependency on @ensdomains/ensjs/wallet and @ensdomains/ensjs/contracts
imports which cause ESM compatibility issues with Playwright's CommonJS runtime.
Replace with inline ABI definitions and direct contract calls using viem's
encodeFunctionData.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When clearing the L1 primary name via setPrimaryNameState, the code would
attempt to call setResolver on the ENS Registry even when no resolver
existed. This caused transaction reverts because the user doesn't own
the reverse node until a primary name is set.

Now queries the current resolver first and only attempts to clear it if
one exists, preventing errors when clearAll is called before any L1
primary name has been set.
Replace direct ensjs/wallet setPrimaryName calls with the
setPrimaryNameState fixture function for consistency across tests.
Update test expectations to reflect default registry behavior when
no L1 primary name exists.
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant